Various services provided by a system for users are actually supported by various corresponding applications.
Usually, a running application receives backflow data from other data sources (such as systems, applications, clients, etc.) all the time. A recommendation scenario is used as an example. User A reads an article, and then the behavior data (namely, reading the article) flows back to a system by using a log. After parsing the log, the system queries friend information of user A, and then flows back the behavior data and the friend information of user A to a recommendation application. As such, the recommendation application can recommend information similar to “Your friend A has read the XX article” to friends of user A based on the backflow data. This kind of application requires high availability because the application needs to provide services for users in real time. However, an application inevitably needs to be upgraded.
In the existing technology, an application upgrade procedure is shown in FIG. 1. In the upgrade process, an operation needs to be performed after manual confirmation in each phase. The procedure includes the following steps:
A1. Manually stop an old application from receiving backflow data from a data source.
A2. Manually submit a command (namely, a kill command) for disabling the old application to an application management module after manually confirming that processing of unprocessed data in the old application is completed.
A3. Manually submit a command (namely, a start command) for starting a new application to the application management module after manually determining that the application management module completely disables the old application.
A4. Wait for the application management module to start the new application.
As described above, because the application is down for upgrade, a service cannot be provided for a user in the entire upgrade process until the new application is started. In addition, because human participation is needed in each phase, a relatively long time is needed for upgrading the entire application. As shown in FIG. 1, a time consumed between A1 and A2 is greater than 4 minutes, a time consumed between A2 and A3 is greater than 3 minutes, a time consumed between A3 and A4 is greater than 3 minutes, and the entire upgrade process needs to take more than 10 minutes.
In conclusion, in the existing technology, there is a problem that an application upgrade takes a relatively long time.